package info.liuxing.condition;

import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

/**
 * 自定义逻辑返回需要导入的组件
 *
 * @author liuxing
 * @summary 自定义逻辑返回需要导入的组件
 * @Copyright (c) 2018, Lianjia Group All Rights Reserved.
 * @since 2018-04-09 00:36
 */
public class MyImportSelector implements ImportSelector {

    /**
     * @param importingClassMetadata 当前标注@Import注解的类的所有注解信息
     * @return 导入到容器中的组件的全类名
     */
    @Override
    public String[] selectImports(AnnotationMetadata importingClassMetadata) {
        return new String[]{"info.liuxing.bean.Blue"};
    }
}
